package com.dong.controller;

import com.dong.entity.VideoType;
import com.dong.service.impl.VideoTypeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class VideoTypeController {
    @Autowired
    private VideoTypeServiceImpl videoTypeService;

    @RequestMapping("/get1")
    public String getAll(Model model){
        List<VideoType> videoTypes = videoTypeService.selectAllVideoType();
        model.addAttribute("list",videoTypes);
        return "videotype";
    }
}
